import Vue from 'vue'
import Router from 'vue-router'
import BeforeLogin from '@/components/BeforeLogin.vue'
import Register from '@/components/Register.vue'

import StudentLogin from '@/components/StudentLogin.vue'
import StudentIndex from '@/components/StudentIndex.vue'
import AllLook from '@/Student/AllLook.vue'
import StudentDelete from '@/Student/StudentDelete.vue'
import StudentInsert from '@/Student/StudentInsert.vue'
import StudentLook from '@/Student/StudentLook.vue'
import StudentInfo from '@/Student/StudentInfo'


import TeacherLogin from '@/components/TeacherLogin.vue'
import TeacherIndex from '@/components/TeacherIndex.vue'
import QueryAllPractice from '@/Teacher/QueryAllPractice'
import AddPractice from '@/Teacher/AddPractice'
import DeletePractice from '@/Teacher/DeletePractice'
import MarkStudent from '@/Teacher/MarkStudent'
import TeacherLook from '@/Teacher/TeacherLook'
import RevisePractice from '@/Teacher/RevisePractice'



import AdminLogin from '@/components/AdminLogin.vue'
import AdminIndex from '@/components/AdminIndex.vue'
import QueryStudent from '@/Admin/QueryStudent.vue'
import QueryTeacher from '@/Admin/QueryTeacher.vue'
import DeleteStudent from '@/Admin/DeleteStudent.vue'
import DeleteTeacher from '@/Admin/DeleteTeacher.vue'
import  AdminLook from '@/Admin/AdminLook.vue'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'beforelogin',
      component: BeforeLogin
    },
    {
      path: '/studentLogin',
      name: 'studentlogin',
      component: StudentLogin,
    },
    {
      path:'/register',
      name: 'register',
      component: Register
    },
    {
      path: '/StudentIndex',
      name: 'studentindex',
      component: StudentIndex,
      children:[
        {
          path: '/AllLook',
          name: 'alllook',
          component: AllLook
        },
        {
          path: '/StudentInsert',
          name: 'studentinsert',
          component: StudentInsert
        },
        {
          path: '/StudentDelete',
          name: 'studentdelete',
          component: StudentDelete
        },
        {
          path: '/StudentLook',
          name: 'studentlook',
          component: StudentLook
        },
        {
          path: '/StudentInfo',
          name: 'studentinfo',
          component: StudentInfo
        }

      ]

      
    },
    {
      path: '/teacherLogin',
      name: 'teacherlogin',
      component: TeacherLogin
    },
    {
      path: '/teacherIndex',
      name: 'teacherindex',
      component: TeacherIndex,
      children:[{
        path: '/queryAllPractice',
        name: 'queryallpractice',
        component: QueryAllPractice
      },{
        path: '/addPractice',
        name: 'addpractice',
        component: AddPractice
      },{
        path: '/deletePractice',
        name: 'deletepractice',
        component: DeletePractice
      },{
        path: '/markStudent',
        name: 'markstudent',
        component: MarkStudent
      },{
        path: '/teacherLook',
        name: 'teacherlook',
        component: TeacherLook
      },{
        path: '/revisePractice',
        name: 'revisepractice',
        component: RevisePractice
      }]
    },









    {
      path: '/adminLogin',
      name: 'adminlogin',
      component: AdminLogin
    },
    {
      path: '/adminIndex',
      name: 'adminindex',
      component: AdminIndex,
      children:[{
        path: '/queryTeacher',
        name: 'queryteacher',
        component: QueryTeacher
      },{
        path: '/queryStudent',
        name: 'querystudent',
        component: QueryStudent
      },{
        path: '/deleteStudent',
        name: 'deletestudent',
        component: DeleteStudent
      },{
        path: '/deleteTeacher',
        name: 'deleteteacher',
        component: DeleteTeacher
      },{
        path: '/AdminLook',
        name: 'adminlook',
        component: AdminLook
      }]
    },
    
  ]
})
